package com.hnevc.mediaplayerdemo;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

public class ListActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_list);
        Button btnMusicPlay = (Button) findViewById(R.id.id_btn_play_music);
        Button btnVideoPlay = (Button) findViewById(R.id.id_btn_play_video);

        btnMusicPlay.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent();
                intent.setClass(ListActivity.this,MusicPlayActivity.class);
                startActivity(intent);
            }
        });
        btnVideoPlay.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent();
                intent.setClass(ListActivity.this,VideoPlayActivity.class);
                startActivity(intent);
            }
        });
    }
}
